{extend name="base" /}
{block name="body"}
<div class="box box-primary">
	<div class="box-header with-border">
		<h3 class="box-title">{$meta_title}</h3>
	</div>
	<div class="box-body">
		<form method="post" class="form form-horizontal" role="form">
			{if !isset($info)}
			{assign name="info" value="" /}
			{/if}
			{if !empty($fieldGroup)}
			<div class="nav-tabs-custom">
				<ul class="nav nav-tabs">
					{volist name="fieldGroup" id="vGroup"}
					<li {if $i eq 1}class="active"{/if}><a href="#tab{$key}" data-toggle="tab">{$key}</a></li>
					{/volist}
				</ul>
				<div class="tab-content">
					{volist name="fieldGroup" id="vGroup"}
					<div class="tab-pane fade {if condition="$i eq 1"}in active{/if}" id="tab{$key}">
						{volist name="vGroup" id="field"}
						{if $field['type'] eq 'hidden'}
						<input type="hidden" name="{$field['name']}" value="{$info[$field['name']]|default=''}"/>
						{else/}
						<div class="form-group">
							<label class="col-sm-2 control-label">{$field['title']|htmlspecialchars}</label>
							<div class="col-sm-10">
								{:form($field, $info)}
								<div class="help-block">{$field['help']|default=''}</div>
							</div>
						</div>
						{/if}
						{/volist}
					</div>
					{/volist}
				</div>
			</div>
			{elseif isset($keyList) /}
			{volist name="keyList" id="field"}
			{if $field['type'] eq 'hidden'}
			<input type="hidden" name="{$field['name']}" value="{$info[$field['name']]|default=''}"/>
			{else/}
			<div class="form-group">
				<label class="col-sm-2 control-label">{$field['title']|htmlspecialchars}</label>
				<div class="col-sm-10">
					{:form($field, $info)}
					<div class="help-block">{$field['help']|default=''}</div>
				</div>
			</div>
			{/if}
			{/volist}
			{/if}
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					{if isset($info['id'])}<input type="hidden" name="id" value="{$info['id']|default=''}">{/if}
					<button class="btn btn-success submit-btn" type="submit">确 定</button>
					<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}